//
//  PosterCardCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/11/16.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "PosterCardCell.h"

@implementation PosterCardCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.tagLab.layer.cornerRadius = 8;
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self pp_clipCorners:UIRectCornerAllCorners radius:10];
    });
    
}

- (void)setModel:(PosterCardModel *)model {
    //[self.mainImageView sd_setImageWithURL:[NSURL URLWithString:model.imageUrl] placeholderImage:[UIImage imageNamed:@"placeholder"]];
    self.mainImageView.image = [UIImage imageNamed:model.local_imageUrl];
    self.codeImageView.image = model.codeImage;
}
@end
